<?php
$articleId=getParameter("articleId");




if ($articleId!=null)
{




    //$sSql="SELECT * FROM shop_articles WHERE shop_articles.id=".$id." and shop_articles.portalId = ".$portalId;


    $sSql="SELECT DISTINCT shop_articles.id,
shop_articles.availability as availability
FROM shop_articles WHERE shop_articles.id=".$articleId." and shop_articles.portalId = ".$portalId;

    //echo $sSql;
    Portal_log($sSql);
    $rs=$GLOBALS["conn"]->Execute($sSql);




    $availability=$rs->fields["availability"];





    ?>

<div class="articlesview">


    <b><?php echo $var_shop_quantity_title; ?></b>
    <div class="quantity">
        <div style="float: left">
            <input type="text" id="quantity" name="quantity" value="1" size="4" />
        </div>


    </div>
    <br clear="all"/>


    <iframe src="http://www.facebook.com/plugins/like.php?href=<?php echo urlencode(curPageURL()); ?>&layout=standard&show_faces=false&width=450&action=like&colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:100%; height:45px"></iframe>
    <br clear="all"/>
    <div>
        <input type="submit" value="<?php echo $var_shop_addtocart; ?>" name="<?php echo $portletUID; ?>submit" class="button"/>
    </div>
    </form>





</div>


</div>

<script type="text/javascript">


    $("#quantity").spinner({min:1,max:<?php echo $availability; ?>,stepping: 1});


    $(document).ready(function() {

        /* This is basic - uses default settings */

        $("a.min").fancybox();
    });
</script>

<?php
}
    ?>